<script setup>
window.onscroll=function (){
const header=document.getElementById("header")
if(window.scrollY!=0){
  header.style.display="none"
}else{
  header.style.display="block"
}

}
</script>

<template>


<el-container style="position: relative;">  
  <el-header id="header" style="width: 100%;;left:0%; position:fixed;" >
    <el-menu
    ellipsis
    router
    class="el-menu-popper-demo"
    mode="horizontal"
    :popper-offset="16"
    style=""
    >
    <el-menu-item index="/" style="margin-left: 10% ; " :route="{path:'/'}" >
  <!-- <router-link   to="/" > -->
    首页
    <!-- </router-link> -->
  </el-menu-item>
  <el-sub-menu index="2" style="margin-left: 13%;">
    <template #title>频道列表</template> 
    <el-menu-item  >
      <router-link to="/">
       电视剧
      </router-link>
    </el-menu-item>
    <el-menu-item >
      <router-link to="/">
        动漫
      </router-link>
    </el-menu-item>
    <el-menu-item >
      <router-link to="/">
        电影
      </router-link>
    </el-menu-item>
    <el-menu-item >
      <router-link to="/"> 
          综艺
      </router-link>
      </el-menu-item>
    </el-sub-menu>
    <el-menu-item index="/home/personal" style="margin-left: 13%;" :route="{name:'personal',params:{index:'personal'}}" >
      我的</el-menu-item>
      <el-menu-item index="/home/submit" style="margin-left: 13%;" :route="{ name: 'submit', params: { index: 'submit' } }" >    
        登录/注册
      </el-menu-item>
      <el-menu-item index="5" style="margin-left:13%;" disabled>Info</el-menu-item>
    </el-menu>
  </el-header>
  <el-main style="margin-top: 100px;;width: 1400px;">
    <router-view/>
  </el-main>
  
    
</el-container>

</template>